//用户模块
const user = {
    //命名空间
    namespaced: true,
    state: () => {
        return {
            //用户信息
            profile: {
                id: '1236767',
                avatar: '',
                nickname: '',
                account: '123',
                mobile: '',
                token: ''
            }
        }
    },
    mutations: {
        // 修改用户信息，payload就是用户信息对象
        setUser(state, payload) {
            console.log(state.profile);
            console.log(payload);
            state.profile = payload
        }
    }

}
module.exports.user = user